home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.compilers / comp.sys.amiga.programmer_26589_000011.msg < prev    next >
Encoding:
Text File  |  1994-11-27  |  1.9 KB  |  63 lines

  1. Path: etek.chalmers.se!chalmers.se!sunic!uunet!ogicse!emory!gatech!concert!sas!mozart.unx.sas.com!walker
  2. From: walker@twix.unx.sas.com (Doug Walker)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Auto opening libraries by SAS/C
  5. Message-ID: <C2nEHC.537@unx.sas.com>
  6. Date: 18 Feb 93 14:20:00 GMT
  7. References: <729977726.F00003@monly.wlink.nl>
  8. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  9. Organization: SAS Institute Inc.
  10. Lines: 50
  11. Originator: walker@twix.unx.sas.com
  12. Nntp-Posting-Host: twix.unx.sas.com
  13.  
  14.  
  15. In article <729977726.F00003@monly.wlink.nl>, Bart.Schraa@f115.n100.z60.wlink.nl (Bart Schraa) writes:
  16. |> What I tried is this:
  17. |> 
  18. |> #include <stdio.h>
  19. |> #include <proto/intuition.h>
  20. |> 
  21. |> long __oslibversion = 38L;
  22. |> 
  23. |> void main(void)
  24. |> {
  25. |>   printf("!\n");
  26. |> }
  27. |> 
  28. |> As my version of the OS is 37, I assume it shouldn't print anything, or at least not a '!'. What am I doing wrong???
  29. |> 
  30.  
  31. You didn't use IntuitionBase, so it didn't get linked in, so it
  32. didn't get initialized.  Declaring it is not the same as using it.
  33.  
  34. You can use it either by calling any Intuition function (the normal
  35. way) or by referring to it in code.
  36.  
  37. Try the code below.  Note that DisplayBeep is an Intuition function.
  38.  
  39.    #include <stdio.h>
  40.    #include <proto/intuition.h>
  41.  
  42.    long __oslibversion = 38L;
  43.  
  44.    void main(void)
  45.    {
  46.       DisplayBeep(NULL);
  47.    }
  48.  
  49. What I get is a line to stdout saying
  50.  
  51.    Can't open version 38 of "intuition.library"
  52.  
  53. and the DisplayBeep never happens.  Change __oslibversion to 37,
  54. and the DisplayBeep will happen (your screen will flash).
  55.  
  56. -- 
  57.   *****
  58. =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
  59.  *|. o.| ||                                          1200/2400/9600 Dual
  60.   | o  |//     For all you do, this bug's for you!
  61.   ====== 
  62. usenet: walker@unx.sas.com                            bix: djwalker 
  63. Any opinions expressed are mine, not those of SAS Institute, Inc.